package cn.tedu.autoshow.passport.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class RoleAddNewParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "角色名称不能为空")
    @ApiModelProperty(value = "角色名称", required = true, example = "角色A")
    private String name;

    @NotNull(message = "角色简介不能为空")
    @ApiModelProperty(value = "角色简介", required = true, example = "角色A简介")
    private String description;

    @NotNull(message = "必须提交排序序号")
    @Range(max = 99, message = "排序序号值必须0~99之间")
    @ApiModelProperty(value = "角色排序,必须是0~255之间的数字", required = true, example = "97")
    private Integer sort;

    @NotNull(message = "角色权限不能为空")
    @ApiModelProperty(value = "角色权限", required = true, example = "{1}")
    private Long[] permissionIds;

}
